package com.nf.health.app.homepage.activity;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.nf.health.app.R;
import com.nf.health.app.activity.global.BaseActivity;
import com.nf.health.app.customview.CircleGradeProgress;
import com.nf.health.app.utils.ActivityUtils;
import com.nf.health.app.utils.ViewUtil;

public class StartCheckActivity extends BaseActivity {

	private TextView  tv_startcheck;
	private String type;
	private String desc;
	String title;
	private CircleGradeProgress progress;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitleBar(R.layout.titlebar_base);
		setContent(R.layout.activity_startcheck);
		TextView titleTV = (TextView) findViewById(R.id.titlebar_title_tv);
		tv_startcheck = (TextView) findViewById(R.id.tv_startcheckId);
		progress = ViewUtil.getView(this, R.id.progress);
		
		type = getIntent().getStringExtra("evalFlag");		
		desc = getIntent().getStringExtra("desc");
		title = getIntent().getStringExtra("title");
		titleTV.setText(title);
		
		tv_startcheck.setText(desc);
		
		initListener();
		
		progress.setProgress(75);//进度条赋值
	}
	private void initListener() {
		progress.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {

				provider.requestEvaluationQueslist(type, "requestEvaluationQueslist");
			}
		});
	}

	@Override
	public void handleActionSuccess(String actionName, Object object) {
		super.handleActionSuccess(actionName, object);
		Bundle bundle = new Bundle();
		bundle.putString("evalFlag", type);
		bundle.putString("title",title);
		ActivityUtils.showActivity(StartCheckActivity.this, EvaluationActivity.class, bundle);
	}
}
